home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.3 KB | 32 lines | [TEXT/GEOL] |
- Item 6705768 23-May-90 22:23PDT
-
- From: D6020 Info Research, John MacVeigh,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: AdjustSize too early!
-
- Just got 2.0 Final, and have a question/complaint already!
-
- TEvtHandler.DoCreateViews has added a call to AdjustSize at the end of it (i.e.
- after all the subviews have been constructed). Problem is, the size of my views
- and windows often depend on the size of subviews, and I refer to those subviews
- in my CalcMinSize routines with instance fields that haven't been assigned yet.
- So things go kablooie with NIL fields. I suppose I could access the views with
- FindSubView calls, but that's a big time penalty in a routine like
- CalcMinSize... Any suggestions?
-
- This resurrects the need for a second "connect things together" pass, after all
- views have been created and initialized (which to me simply means setting
- instance fields to Nil so that Free can be safely called at any time). Is there
- any way to give the views a chance to initialize instance fields _after_ all
- subviews are created and linked, but _before_ size and position calls are made?
-
- While I'm at it, how about a CalcMaxSize method? I find myself adding these in
- order to create windows which can't be resized larger than (one of) the content
- view(s).
-
- --John MacVeigh
-
-
-